import cpnstyles from './cpnstyles.less';

interface IncomeProps {
  traffic: number | string;
  lots: number;
}

const WeekIncome = (props: IncomeProps) => {
  const { traffic, lots } = props;
  return (
    <div className={cpnstyles.income}>
      <div className={cpnstyles.parking}>
        今日停车流量 <span>{traffic}</span> 辆
      </div>
      <div className={cpnstyles.compare}>
        路段总数 <span>{Math.abs(lots)}</span> 条
      </div>
    </div>
  );
};

export default WeekIncome;
